package com.ytjj.qmyx.admin.service.imService;

import com.ytjj.common.api.CommonPage;
import com.ytjj.common.api.CommonResult;
import com.ytjj.qmyx.admin.model.ImSessionInfo;
import com.ytjj.qmyx.admin.model.dto.AdminDto;
import com.ytjj.qmyx.admin.model.dto.CustomerListDto;
import com.ytjj.qmyx.admin.model.dto.ImSessionInfoDto;
import com.ytjj.qmyx.admin.model.request.im.ImMonitorListRequest;
import com.ytjj.qmyx.admin.model.request.im.ImRealTimeServiceDateListRequest;
import com.ytjj.qmyx.admin.model.request.im.ImSessionInfoRequest;
import com.ytjj.qmyx.admin.model.request.im.ImWorkReportListRequest;
import com.ytjj.qmyx.admin.model.response.im.ImMonitorListItemResponse;
import com.ytjj.qmyx.admin.model.response.im.ImRealTimeServiceDateListResponse;
import com.ytjj.qmyx.admin.model.response.im.ImSessionInfoResponse;
import com.ytjj.qmyx.admin.model.response.im.ImWorkReportListResponse;
import com.ytjj.qmyx.admin.model.vo.ImSessionInfoVO;
import io.swagger.models.auth.In;

import java.util.List;
import java.util.Map;


public interface ImSessionInfoService {



    /**
     * 获取该客服的客户列表
     * @param
     * @return
     */
    CustomerListDto getCustomerList(String serviceId, Integer sessionId);

    /**
     * 会话转移
     * @param bean
     * @return
     */
    CommonResult sessionTransferByOldObj(ImSessionInfo bean);

    /**
     * 结束会话
     * @param request
     * @return
     */
    CommonResult finalSession(ImSessionInfoRequest request);

    /**
     *   根据客户唯一标识获取访问记录
     *
     * @return
     */
    ImSessionInfoResponse getAccessRecord(String customerId, Integer id);

    /**
     *   条件获取访问记录
     * @param ImSessionInfoVO
     * @return
     */
    CommonPage getAllAccessRecord(ImSessionInfoVO ImSessionInfoVO);

    /**
     *  更新客户满意度
     * @return
     */
    CommonResult updateSatisfaction(ImSessionInfoVO imSessionInfoVO);


    ImSessionInfo selectById(Integer sessionId);

    /**
     * 获取智能监控列表数据
     * @param request
     * @return
     */
    CommonPage<ImMonitorListItemResponse> queryMonitorSessionList(ImMonitorListRequest request);

    /**
     * 查下当前会话中的总数
     * @return
     */
    Integer queryMeetingSessionNum();

    List<AdminDto> selectName(Integer type);

    /**
     * 实时客服数据列表
     * @return
     */
    CommonPage<ImRealTimeServiceDateListResponse> realTimeServiceData(ImRealTimeServiceDateListRequest request);

    /**
     * 客服工作报表
     * @param request
     * @return
     */
    CommonPage<ImWorkReportListResponse> workReport(ImWorkReportListRequest request);

    List<ImSessionInfo> querySessionListByCustomerId(String customerId);

    List<ImSessionInfo> querySessionListByServiceId(String serviceId, Integer status);

    /**
     * 查看客服沟通中的会话
     * @param userId
     * @return
     */
    List<ImSessionInfoDto> selectSessionByUserId(String userId);

    /**
     * 重新发起会话
     */
    void updateSessionByCustomerId(String customerId,String serviceId,Integer leaveMsgId);

    /**
     * 查询实时客服当前客服数据
     * @return
     */
    Map<String, Integer> findServiceStatusInfo();

    /**
     * 查询今天的会话数量
     * @return
     */
    int findToDayCount();
}
